package com.job.client.common.exception;

import lombok.extern.slf4j.Slf4j;

/*
* Throwable:所有的错误异常根类
* */
@Slf4j
public class MyselfException extends RuntimeException{
    private Integer code;
    private String message;

    public MyselfException(Integer code,String message,Throwable cause){
        super(message,cause);
        this.code=code;
        this.message=message;
        log.error(message);
    }
    public MyselfException(Integer code,Throwable cause){
        this(code,cause.getMessage(),cause);
    }
    public MyselfException(Integer code,String message){
        this(code,message,null);
    }
    public MyselfException(Throwable cause){
        this(201,cause.getMessage(),cause);
    }

}
